<?php

/*
 * Author: Panos
 * Enables a Category in Database if the user that tries to enable it is its owner
 */

function BL_enableCategory($categoryId, $userId)
{
    if ($categoryId < 0)
        return BL_ENABLE_CATEGORY;

    $category = DB_getCategory($categoryId);

    //cross exam if the user that wants to enable the category is its owner
  //  if ($ownerId == $category->GetOwner())
   // {
        $err_no = DB_activateCategory($categoryId);
        return $err_no >= 0 ? BL_OK : BL_ENABLE_CATEGORY;
    //}
    //else
      //  return BL_NOT_OWNER;
}

?>
